<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;padding: 0;
        }
        .card{
            width: 400px;
            position: relative;
        }
        .card img{
            width: 100%;
        }
        /* .card figcaption{ */
            /* position: absolute;
            bottom: 15px;
            left: 0; */
            /* color: #fff;
            margin-top: -30px;
        } */
        figure{
            display: inline-grid;
        }
        .card figcaption{
            color: #fff;
            align-self: end;
            line-height: 2;
            background: transparent;
            text-align: center;
        }
        figure > img,
        figure > figcaption{
            grid-area: 1 / 2;
        }
    </style>
</head>
<body>
    <!-- <div class="card">
        <img src="./a.png" alt="">
        <div>上海钓鱼风景 办一张想</div>
    </div> -->
    <figure class="card"> <!-- 图表标签 -->
        <img src="./a.png" alt="">
        <figcaption>上海钓鱼风景 办一张想</figcaption>
    </figure>
</body>
</html>